healthiar R package workshop 1 for WP5
2025-03-24
Let’s start by checking out the BEST-COST GitHub repo and the README file
The README file contains the following information
healthiar R packagehealthiar (1/2) ## About
healthiar (2/2)
The core function family of healthiar is the attribute family, used to attribute health impacts to a (environmental) risk factor, e.g. noise or air pollution. - attribute_health can be used for relative and absolute risk assessments - attribute_lifetable is used for (RR & AR) life table assessment
The extended family is the compare family, which is used to compare two scenarios with the population impact fraction (PIF) or delta approach.
Then there are the in-laws, which are the “additional” analysis functions that can be run after the initial attribute or compare function calls - Economic analysis (WP2) + monetize + cba - Social analysis (WP3) + get_mdi + socialize - Summary uncertainty (i.e. Monte Carlo simulation) - Multi-pollutant exposure + INSERT_NAME TODO
healthiar package environment in RStudiohealthiar in RStudio 1/3RStudio startup screen
healthiar in RStudio 2/3Post installation, you can access the healthiar package landing page in RStudio by going to the Packages tab and then clicking on the healthiar package.
healthiar in RStudio 3/3Landing page of the healthiar package in RStudio, where you find the package vignettes and function documentation.
The vignette introduces healthiar step-by-step and contains (reproducible) examples. You can open the intro_to_healthiar vignette within RStudio or as a HTML within your browser.
Note
The vignette is a work in progress: we appreciate any feedback or suggestions you might have to make it more useful to future users!
Access the function documentation (= fun doc) by clicking on a function name in the package landing page.
Tip
When the package is loaded (via library(healthiar)) access the fun doc of e.g. attribute_health by running ?attribute_health.
Any fun doc contains the following sections:
Title Essence of the function
Description What does the function do exactly?
Usage Bare-minimum examples of how to use the function (includes default values if there are any)
Arguments Short description of each function argument: input type (numeric vs. string), options (if available), how each argument affects the output.
Details (optional) Additional details about the function
Value Information about the function output
Examples (optional) Shows how the function works
Title section
The title summarizes the function of the function (hehe) in one sentence.
The title shows up next to the function name in the package landing page.
Description section provides additional details about the function’s purpose
Usage section In the usage section you can find a bare-minimum function “template”, which can either be auto-generated or created manually, as in this case.
Important
Any arguments that appear without a = symbol after them in the usage section have to be user-specified in all function call.
Note
The inputs to the arguments in the usage section are default inputs
Arguments section This is the core section of the function documentation, where input type (numeric vs. string) & input options (if available) are specified.
::: callout-warning Depending on the function, this section might be not very developed at the moment. Sometimes more function details are found in the intro vignette. :::
Value section Information about the function output
Example section (optional) Shows how the function works
Tip
By clicking on Run examples the example(s) are executed and the output shown
Example output Obtained by clicking on Run examples (see previous slide)
note: quickly introduce the main workflow of burden assessments
attribute call without input uncertaintiesGoal: attribute COPD cases to air pollution
Tip
healthiar comes with some example data that start with exdat_ that allow you to test functions.
results_pm_copd <-
healthiar::attribute_health(
erf_shape = "log_linear",
rr_central = exdat_pm_copd$relative_risk,
rr_lower = exdat_pm_copd$relative_risk_lower,
rr_upper = exdat_pm_copd$relative_risk_upper,
rr_increment = 10,
exp_central = exdat_pm_copd$mean_concentration,
cutoff_central = exdat_pm_copd$cut_off_value,
bhd_central = exdat_pm_copd$incidents_per_100_000_per_year/1E5*exdat_pm_copd$population_at_risk,
# bhd_central = exdat_pm_copd$incidence # Uncomment once change committed to main
) Every attribute output consists of two lists (“folders”)
health_main contains the main results
health_detailed detailed results (and in some cases even more information about the assessment/calculation)
note: add here that format is tibble (but can be changed to data frame)
note: screenshot of how to click on variable in env (put that as first option) . . .
Tip
This is personal preference! However, you might encounter all options.
Go to the Environment tab in RStudio and click on a variable to “open” it. Alternatively, you can use View(results_pm_copd), which has the same effect.
results_pm_copd$health_main$impact_rounded
Note: after typing the $ sign you can see all available options by pressing the tab key and use the arrows & tab keys to select an option (or alternatively use the mouse)
results_pm_copd[["health_main"]]
Note: if the cursor is located within the square braces you can see all available options by pressing the tab key
Using the purrr::pluck function to select a list and then the dplyr::pull function extract values from a specified column
results_pm_copd |> purrr::pluck("health_main") |> dplyr::pull("impact_rounded")
Note: available options can’t be displayed automatically using these functions -> better suited for a more permanent analysis script
| impact_rounded | impact | pop_fraction | erf_ci | rr | exp | bhd |
|---|---|---|---|---|---|---|
| 3502 | 3501.962 | 0.1138961 | central | 1.369 | 8.85 | 30747 |
| 1353 | 1353.066 | 0.0440064 | lower | 1.124 | 8.85 | 30747 |
| 5474 | 5473.888 | 0.1780300 | upper | 1.664 | 8.85 | 30747 |
Tip
Each row shows a result obtained with all the input data & calculation pathway specifications shown in that row
Some of the most relevant columns include: - impact_rounded Rounded attributable health impact/burden - impact Raw impact/burden - pop_fraction Population attributable fraction (PAF) - erf_ci Specifies whether rr_central, ..._lower or ..._upper was used in calculation - rr Specifies raw rr used in calculation - - exp - bhd*
attribute with input uncertaintiesGoal: attribute lung cancer deaths to PM2.5 exposure
Tip
See the intro vignette for a detailed description of output columns.
The health_detailed output table contains all different combinations of the arguments with uncertainty. E.g. rr_central with exp_lower and bhd_upper, …
| geo_id_disaggregated | erf_ci | exp_ci | bhd_ci | cutoff_ci | pop_fraction | impact | prop_pop_exp | rr_increment | erf_shape | exposure_name | approach_risk | health_outcome | exposure_dimension | exposure_type | exp | rr | bhd | cutoff | pop_fraction_type | rr_conc | impact_rounded |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | central | central | central | central | 0.1138961 | 3501.9619 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.369 | 30747 | 5 | paf | 1.128536 | 3502 |
| 1 | central | central | lower | central | 0.1138961 | 3189.0894 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.369 | 28000 | 5 | paf | 1.128536 | 3189 |
| 1 | central | central | upper | central | 0.1138961 | 3644.6736 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.369 | 32000 | 5 | paf | 1.128536 | 3645 |
| 1 | lower | central | central | central | 0.0440064 | 1353.0658 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.124 | 30747 | 5 | paf | 1.046032 | 1353 |
| 1 | lower | central | lower | central | 0.0440064 | 1232.1801 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.124 | 28000 | 5 | paf | 1.046032 | 1232 |
| 1 | lower | central | upper | central | 0.0440064 | 1408.2058 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.124 | 32000 | 5 | paf | 1.046032 | 1408 |
| 1 | upper | central | central | central | 0.1780300 | 5473.8882 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.664 | 30747 | 5 | paf | 1.216589 | 5474 |
| 1 | upper | central | lower | central | 0.1780300 | 4984.8398 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.664 | 28000 | 5 | paf | 1.216589 | 4985 |
| 1 | upper | central | upper | central | 0.1780300 | 5696.9598 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.85 | 1.664 | 32000 | 5 | paf | 1.216589 | 5697 |
| 1 | central | lower | central | central | 0.0899213 | 2764.8092 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.369 | 30747 | 5 | paf | 1.098806 | 2765 |
| 1 | central | lower | lower | central | 0.0899213 | 2517.7955 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.369 | 28000 | 5 | paf | 1.098806 | 2518 |
| 1 | central | lower | upper | central | 0.0899213 | 2877.4806 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.369 | 32000 | 5 | paf | 1.098806 | 2877 |
| 1 | lower | lower | central | central | 0.0344604 | 1059.5528 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.124 | 30747 | 5 | paf | 1.035690 | 1060 |
| 1 | lower | lower | lower | central | 0.0344604 | 964.8902 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.124 | 28000 | 5 | paf | 1.035690 | 965 |
| 1 | lower | lower | upper | central | 0.0344604 | 1102.7316 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.124 | 32000 | 5 | paf | 1.035690 | 1103 |
| 1 | upper | lower | central | central | 0.1416706 | 4355.9450 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.664 | 30747 | 5 | paf | 1.165054 | 4356 |
| 1 | upper | lower | lower | central | 0.1416706 | 3966.7760 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.664 | 28000 | 5 | paf | 1.165054 | 3967 |
| 1 | upper | lower | upper | central | 0.1416706 | 4533.4583 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8.00 | 1.664 | 32000 | 5 | paf | 1.165054 | 4533 |
| 1 | central | upper | central | central | 0.1453304 | 4468.4726 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.369 | 30747 | 5 | paf | 1.170043 | 4468 |
| 1 | central | upper | lower | central | 0.1453304 | 4069.2501 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.369 | 28000 | 5 | paf | 1.170043 | 4069 |
| 1 | central | upper | upper | central | 0.1453304 | 4650.5716 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.369 | 32000 | 5 | paf | 1.170043 | 4651 |
| 1 | lower | upper | central | central | 0.0567717 | 1745.5580 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.124 | 30747 | 5 | paf | 1.060189 | 1746 |
| 1 | lower | upper | lower | central | 0.0567717 | 1589.6063 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.124 | 28000 | 5 | paf | 1.060189 | 1590 |
| 1 | lower | upper | upper | central | 0.0567717 | 1816.6929 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.124 | 32000 | 5 | paf | 1.060189 | 1817 |
| 1 | upper | upper | central | central | 0.2247829 | 6911.4001 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.664 | 30747 | 5 | paf | 1.289961 | 6911 |
| 1 | upper | upper | lower | central | 0.2247829 | 6293.9214 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.664 | 28000 | 5 | paf | 1.289961 | 6294 |
| 1 | upper | upper | upper | central | 0.2247829 | 7193.0531 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10.00 | 1.664 | 32000 | 5 | paf | 1.289961 | 7193 |
attribute with exposure categories (noise)Goal: attribute cases of high annoyance (HA) to noise exposure
exdat_noise_ha <-
exdat_noise_ha |>
dplyr::filter(!is.na(exdat_noise_ha$exposure_mean))
results_noise_ha <-
healthiar::attribute_health(
approach_risk = "absolute_risk",
exp_central = c(57.5, 62.5, 67.5, 72.5, 77.5),
population = sum(exdat_noise_ha$population_exposed_total), # TO DO: hard code input here
prop_pop_exp = exdat_noise_ha$population_exposed_total /
sum(exdat_noise_ha$population_exposed_total),
erf_eq_central = "78.9270-3.1162*c+0.0342*c^2")| geo_id_disaggregated | erf_ci | exp_ci | population | prop_pop_exp | exposure_name | approach_risk | health_outcome | exposure_dimension | exposure_type | exp | erf_eq | absolute_risk_as_percent | pop_exp | impact | impact_rounded | impact_per_100k_inhab |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | central | central | 945200 | 0.4099661 | NA | absolute_risk | same_input_output | 1 | exposure_distribution | 57.5 | 78.9270-3.1162c+0.0342c^2 | 12.81925 | 387500 | 49674.594 | 49675 | 5255.4585 |
| 1 | central | central | 945200 | 0.3025815 | NA | absolute_risk | same_input_output | 2 | exposure_distribution | 62.5 | 78.9270-3.1162c+0.0342c^2 | 17.75825 | 286000 | 50788.595 | 50789 | 5373.3173 |
| 1 | central | central | 945200 | 0.2029200 | NA | absolute_risk | same_input_output | 3 | exposure_distribution | 67.5 | 78.9270-3.1162c+0.0342c^2 | 24.40725 | 191800 | 46813.105 | 46813 | 4952.7196 |
| 1 | central | central | 945200 | 0.0763860 | NA | absolute_risk | same_input_output | 4 | exposure_distribution | 72.5 | 78.9270-3.1162c+0.0342c^2 | 32.76625 | 72200 | 23657.232 | 23657 | 2502.8811 |
| 1 | central | central | 945200 | 0.0081464 | NA | absolute_risk | same_input_output | 5 | exposure_distribution | 77.5 | 78.9270-3.1162c+0.0342c^2 | 42.83525 | 7700 | 3298.314 | 3298 | 348.9541 |
Goal: attribute disease cases to PM2.5 exposure in multiple geographic units, such as municipalities, provinces, countries, …
Tip
For iterations, enter geo unit-specific inputs as lists use as.list() function
Feed unique geo ID’s to the `geo_id_disaggregated` argument (e.g. municipality names)
Optional: aggregate geo unit-specific results by providing higher-level ID’s (e.g. region names)
results_iteration <- healthiar::attribute_health(
geo_id_disaggregated = c("Zurich", "Basel", "Geneva", "Ticino", "Valais"),
geo_id_aggregated = c("Ger","Ger","Fra","Ita","Fra"),
rr_central = 1.369,
rr_increment = 10,
cutoff_central = 5,
erf_shape = "log_linear",
exp_central = as.list(c(11, 11, 10, 8, 7)),
bhd_central = as.list(c(4000, 2500, 3000, 1500, 500))
)Here the we want to aggregate results by language region ("Ger", "Fra", "Ita")
results_iteration <- healthiar::attribute_health(
geo_id_disaggregated = c("Zurich", "Basel", "Geneva", "Ticino", "Valais"),
geo_id_aggregated = c("Ger","Ger","Fra","Ita","Fra"),
rr_central = 1.369,
rr_increment = 10,
cutoff_central = 5,
erf_shape = "log_linear",
exp_central = c(11, 11, 10, 8, 7) |> as.list(),
bhd_central = c(4000, 2500, 3000, 1500, 500) |> as.list()
)Tip
The main output contains aggregated results if available, or disaggregated results if no aggregation ID was provided
| geo_id_aggregated | impact_rounded | erf_ci | exp_ci | bhd_ci |
|---|---|---|---|---|
| Fra | 466 | central | central | central |
| Ger | 1116 | central | central | central |
| Ita | 135 | central | central | central |
Analogously to the single geo unit example the iteration can also be run with uncertainties in one or more input variables.
results_iteration <- healthiar::attribute_health(
geo_id_disaggregated = c("Zurich", "Basel", "Geneva", "Ticino", "Valais"),
geo_id_aggregated = c("Ger","Ger","Fra","Ita","Fra"),
rr_central = 1.369,
rr_lower = 1.124,
rr_upper = 1.664,
rr_increment = 10,
cutoff_central = 5,
erf_shape = "log_linear",
exp_central = as.list(c(11, 11, 10, 8, 7)),
exp_lower = as.list(c(10, 10, 9, 7, 6)),
exp_upper = as.list(c(12, 12, 11, 9, 8)),
bhd_central = as.list(c(4000, 2500, 3000, 1500, 500)),
bhd_lower = as.list(c(3000, 1875, 2250, 1125, 375)),
bhd_upper = as.list(c(5000, 3125, 3750, 1875, 625))
)| geo_id_aggregated | geo_id_disaggregated | erf_ci | exp_ci | bhd_ci | cutoff_ci | pop_fraction | impact | prop_pop_exp | rr_increment | erf_shape | exposure_name | approach_risk | health_outcome | exposure_dimension | exposure_type | exp | rr | bhd | cutoff | pop_fraction_type | rr_conc | impact_rounded |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Ger | Zurich | central | central | central | central | 0.1717567 | 687.02680 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 4000 | 5 | paf | 1.207375 | 687 |
| Ger | Zurich | central | central | lower | central | 0.1717567 | 515.27010 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 3000 | 5 | paf | 1.207375 | 515 |
| Ger | Zurich | central | central | upper | central | 0.1717567 | 858.78350 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 5000 | 5 | paf | 1.207375 | 859 |
| Ger | Zurich | lower | central | central | central | 0.0677332 | 270.93284 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 4000 | 5 | paf | 1.072654 | 271 |
| Ger | Zurich | lower | central | lower | central | 0.0677332 | 203.19963 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 3000 | 5 | paf | 1.072654 | 203 |
| Ger | Zurich | lower | central | upper | central | 0.0677332 | 338.66605 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 5000 | 5 | paf | 1.072654 | 339 |
| Ger | Zurich | upper | central | central | central | 0.2632706 | 1053.08236 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 4000 | 5 | paf | 1.357350 | 1053 |
| Ger | Zurich | upper | central | lower | central | 0.2632706 | 789.81177 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 3000 | 5 | paf | 1.357350 | 790 |
| Ger | Zurich | upper | central | upper | central | 0.2632706 | 1316.35295 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 5000 | 5 | paf | 1.357350 | 1316 |
| Ger | Zurich | central | lower | central | central | 0.1453304 | 581.32145 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 4000 | 5 | paf | 1.170043 | 581 |
| Ger | Zurich | central | lower | lower | central | 0.1453304 | 435.99109 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 3000 | 5 | paf | 1.170043 | 436 |
| Ger | Zurich | central | lower | upper | central | 0.1453304 | 726.65181 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 5000 | 5 | paf | 1.170043 | 727 |
| Ger | Zurich | lower | lower | central | central | 0.0567717 | 227.08661 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 4000 | 5 | paf | 1.060189 | 227 |
| Ger | Zurich | lower | lower | lower | central | 0.0567717 | 170.31496 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 3000 | 5 | paf | 1.060189 | 170 |
| Ger | Zurich | lower | lower | upper | central | 0.0567717 | 283.85826 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 5000 | 5 | paf | 1.060189 | 284 |
| Ger | Zurich | upper | lower | central | central | 0.2247829 | 899.13164 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 4000 | 5 | paf | 1.289961 | 899 |
| Ger | Zurich | upper | lower | lower | central | 0.2247829 | 674.34873 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 3000 | 5 | paf | 1.289961 | 674 |
| Ger | Zurich | upper | lower | upper | central | 0.2247829 | 1123.91454 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 5000 | 5 | paf | 1.289961 | 1124 |
| Ger | Zurich | central | upper | central | central | 0.1973659 | 789.46375 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 4000 | 5 | paf | 1.245898 | 789 |
| Ger | Zurich | central | upper | lower | central | 0.1973659 | 592.09781 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 3000 | 5 | paf | 1.245898 | 592 |
| Ger | Zurich | central | upper | upper | central | 0.1973659 | 986.82969 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 5000 | 5 | paf | 1.245898 | 987 |
| Ger | Zurich | lower | upper | central | central | 0.0785674 | 314.26953 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 4000 | 5 | paf | 1.085267 | 314 |
| Ger | Zurich | lower | upper | lower | central | 0.0785674 | 235.70214 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 3000 | 5 | paf | 1.085267 | 236 |
| Ger | Zurich | lower | upper | upper | central | 0.0785674 | 392.83691 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 5000 | 5 | paf | 1.085267 | 393 |
| Ger | Zurich | upper | upper | central | central | 0.2998475 | 1199.38980 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 4000 | 5 | paf | 1.428260 | 1199 |
| Ger | Zurich | upper | upper | lower | central | 0.2998475 | 899.54235 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 3000 | 5 | paf | 1.428260 | 900 |
| Ger | Zurich | upper | upper | upper | central | 0.2998475 | 1499.23725 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 5000 | 5 | paf | 1.428260 | 1499 |
| Ger | Basel | central | central | central | central | 0.1717567 | 429.39175 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 2500 | 5 | paf | 1.207375 | 429 |
| Ger | Basel | central | central | lower | central | 0.1717567 | 322.04381 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 1875 | 5 | paf | 1.207375 | 322 |
| Ger | Basel | central | central | upper | central | 0.1717567 | 536.73969 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 3125 | 5 | paf | 1.207375 | 537 |
| Ger | Basel | lower | central | central | central | 0.0677332 | 169.33303 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 2500 | 5 | paf | 1.072654 | 169 |
| Ger | Basel | lower | central | lower | central | 0.0677332 | 126.99977 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 1875 | 5 | paf | 1.072654 | 127 |
| Ger | Basel | lower | central | upper | central | 0.0677332 | 211.66628 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 3125 | 5 | paf | 1.072654 | 212 |
| Ger | Basel | upper | central | central | central | 0.2632706 | 658.17648 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 2500 | 5 | paf | 1.357350 | 658 |
| Ger | Basel | upper | central | lower | central | 0.2632706 | 493.63236 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 1875 | 5 | paf | 1.357350 | 494 |
| Ger | Basel | upper | central | upper | central | 0.2632706 | 822.72060 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 3125 | 5 | paf | 1.357350 | 823 |
| Ger | Basel | central | lower | central | central | 0.1453304 | 363.32591 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 2500 | 5 | paf | 1.170043 | 363 |
| Ger | Basel | central | lower | lower | central | 0.1453304 | 272.49443 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 1875 | 5 | paf | 1.170043 | 272 |
| Ger | Basel | central | lower | upper | central | 0.1453304 | 454.15738 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 3125 | 5 | paf | 1.170043 | 454 |
| Ger | Basel | lower | lower | central | central | 0.0567717 | 141.92913 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 2500 | 5 | paf | 1.060189 | 142 |
| Ger | Basel | lower | lower | lower | central | 0.0567717 | 106.44685 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 1875 | 5 | paf | 1.060189 | 106 |
| Ger | Basel | lower | lower | upper | central | 0.0567717 | 177.41141 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 3125 | 5 | paf | 1.060189 | 177 |
| Ger | Basel | upper | lower | central | central | 0.2247829 | 561.95727 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 2500 | 5 | paf | 1.289961 | 562 |
| Ger | Basel | upper | lower | lower | central | 0.2247829 | 421.46795 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 1875 | 5 | paf | 1.289961 | 421 |
| Ger | Basel | upper | lower | upper | central | 0.2247829 | 702.44659 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 3125 | 5 | paf | 1.289961 | 702 |
| Ger | Basel | central | upper | central | central | 0.1973659 | 493.41484 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 2500 | 5 | paf | 1.245898 | 493 |
| Ger | Basel | central | upper | lower | central | 0.1973659 | 370.06113 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 1875 | 5 | paf | 1.245898 | 370 |
| Ger | Basel | central | upper | upper | central | 0.1973659 | 616.76856 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.369 | 3125 | 5 | paf | 1.245898 | 617 |
| Ger | Basel | lower | upper | central | central | 0.0785674 | 196.41845 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 2500 | 5 | paf | 1.085267 | 196 |
| Ger | Basel | lower | upper | lower | central | 0.0785674 | 147.31384 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 1875 | 5 | paf | 1.085267 | 147 |
| Ger | Basel | lower | upper | upper | central | 0.0785674 | 245.52307 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.124 | 3125 | 5 | paf | 1.085267 | 246 |
| Ger | Basel | upper | upper | central | central | 0.2998475 | 749.61863 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 2500 | 5 | paf | 1.428260 | 750 |
| Ger | Basel | upper | upper | lower | central | 0.2998475 | 562.21397 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 1875 | 5 | paf | 1.428260 | 562 |
| Ger | Basel | upper | upper | upper | central | 0.2998475 | 937.02328 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 12 | 1.664 | 3125 | 5 | paf | 1.428260 | 937 |
| Fra | Geneva | central | central | central | central | 0.1453304 | 435.99109 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 3000 | 5 | paf | 1.170043 | 436 |
| Fra | Geneva | central | central | lower | central | 0.1453304 | 326.99331 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 2250 | 5 | paf | 1.170043 | 327 |
| Fra | Geneva | central | central | upper | central | 0.1453304 | 544.98886 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.369 | 3750 | 5 | paf | 1.170043 | 545 |
| Fra | Geneva | lower | central | central | central | 0.0567717 | 170.31496 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 3000 | 5 | paf | 1.060189 | 170 |
| Fra | Geneva | lower | central | lower | central | 0.0567717 | 127.73622 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 2250 | 5 | paf | 1.060189 | 128 |
| Fra | Geneva | lower | central | upper | central | 0.0567717 | 212.89370 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.124 | 3750 | 5 | paf | 1.060189 | 213 |
| Fra | Geneva | upper | central | central | central | 0.2247829 | 674.34873 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 3000 | 5 | paf | 1.289961 | 674 |
| Fra | Geneva | upper | central | lower | central | 0.2247829 | 505.76154 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 2250 | 5 | paf | 1.289961 | 506 |
| Fra | Geneva | upper | central | upper | central | 0.2247829 | 842.93591 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 10 | 1.664 | 3750 | 5 | paf | 1.289961 | 843 |
| Fra | Geneva | central | lower | central | central | 0.1180609 | 354.18256 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.369 | 3000 | 5 | paf | 1.133865 | 354 |
| Fra | Geneva | central | lower | lower | central | 0.1180609 | 265.63692 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.369 | 2250 | 5 | paf | 1.133865 | 266 |
| Fra | Geneva | central | lower | upper | central | 0.1180609 | 442.72819 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.369 | 3750 | 5 | paf | 1.133865 | 443 |
| Fra | Geneva | lower | lower | central | central | 0.0456812 | 137.04363 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.124 | 3000 | 5 | paf | 1.047868 | 137 |
| Fra | Geneva | lower | lower | lower | central | 0.0456812 | 102.78272 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.124 | 2250 | 5 | paf | 1.047868 | 103 |
| Fra | Geneva | lower | lower | upper | central | 0.0456812 | 171.30453 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.124 | 3750 | 5 | paf | 1.047868 | 171 |
| Fra | Geneva | upper | lower | central | central | 0.1842846 | 552.85375 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.664 | 3000 | 5 | paf | 1.225918 | 553 |
| Fra | Geneva | upper | lower | lower | central | 0.1842846 | 414.64031 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.664 | 2250 | 5 | paf | 1.225918 | 415 |
| Fra | Geneva | upper | lower | upper | central | 0.1842846 | 691.06718 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.664 | 3750 | 5 | paf | 1.225918 | 691 |
| Fra | Geneva | central | upper | central | central | 0.1717567 | 515.27010 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 3000 | 5 | paf | 1.207375 | 515 |
| Fra | Geneva | central | upper | lower | central | 0.1717567 | 386.45258 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 2250 | 5 | paf | 1.207375 | 386 |
| Fra | Geneva | central | upper | upper | central | 0.1717567 | 644.08763 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.369 | 3750 | 5 | paf | 1.207375 | 644 |
| Fra | Geneva | lower | upper | central | central | 0.0677332 | 203.19963 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 3000 | 5 | paf | 1.072654 | 203 |
| Fra | Geneva | lower | upper | lower | central | 0.0677332 | 152.39972 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 2250 | 5 | paf | 1.072654 | 152 |
| Fra | Geneva | lower | upper | upper | central | 0.0677332 | 253.99954 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.124 | 3750 | 5 | paf | 1.072654 | 254 |
| Fra | Geneva | upper | upper | central | central | 0.2632706 | 789.81177 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 3000 | 5 | paf | 1.357350 | 790 |
| Fra | Geneva | upper | upper | lower | central | 0.2632706 | 592.35883 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 2250 | 5 | paf | 1.357350 | 592 |
| Fra | Geneva | upper | upper | upper | central | 0.2632706 | 987.26471 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 11 | 1.664 | 3750 | 5 | paf | 1.357350 | 987 |
| Ita | Ticino | central | central | central | central | 0.0899213 | 134.88190 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.369 | 1500 | 5 | paf | 1.098806 | 135 |
| Ita | Ticino | central | central | lower | central | 0.0899213 | 101.16143 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.369 | 1125 | 5 | paf | 1.098806 | 101 |
| Ita | Ticino | central | central | upper | central | 0.0899213 | 168.60238 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.369 | 1875 | 5 | paf | 1.098806 | 169 |
| Ita | Ticino | lower | central | central | central | 0.0344604 | 51.69055 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.124 | 1500 | 5 | paf | 1.035690 | 52 |
| Ita | Ticino | lower | central | lower | central | 0.0344604 | 38.76791 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.124 | 1125 | 5 | paf | 1.035690 | 39 |
| Ita | Ticino | lower | central | upper | central | 0.0344604 | 64.61318 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.124 | 1875 | 5 | paf | 1.035690 | 65 |
| Ita | Ticino | upper | central | central | central | 0.1416706 | 212.50586 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.664 | 1500 | 5 | paf | 1.165054 | 213 |
| Ita | Ticino | upper | central | lower | central | 0.1416706 | 159.37939 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.664 | 1125 | 5 | paf | 1.165054 | 159 |
| Ita | Ticino | upper | central | upper | central | 0.1416706 | 265.63232 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 8 | 1.664 | 1875 | 5 | paf | 1.165054 | 266 |
| Ita | Ticino | central | lower | central | central | 0.0608838 | 91.32577 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.369 | 1500 | 5 | paf | 1.064831 | 91 |
| Ita | Ticino | central | lower | lower | central | 0.0608838 | 68.49433 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.369 | 1125 | 5 | paf | 1.064831 | 68 |
| Ita | Ticino | central | lower | upper | central | 0.0608838 | 114.15721 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.369 | 1875 | 5 | paf | 1.064831 | 114 |
| Ita | Ticino | lower | lower | central | central | 0.0231076 | 34.66138 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.124 | 1500 | 5 | paf | 1.023654 | 35 |
| Ita | Ticino | lower | lower | lower | central | 0.0231076 | 25.99603 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.124 | 1125 | 5 | paf | 1.023654 | 26 |
| Ita | Ticino | lower | lower | upper | central | 0.0231076 | 43.32672 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.124 | 1875 | 5 | paf | 1.023654 | 43 |
| Ita | Ticino | upper | lower | central | central | 0.0968303 | 145.24552 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.664 | 1500 | 5 | paf | 1.107212 | 145 |
| Ita | Ticino | upper | lower | lower | central | 0.0968303 | 108.93414 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.664 | 1125 | 5 | paf | 1.107212 | 109 |
| Ita | Ticino | upper | lower | upper | central | 0.0968303 | 181.55690 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 7 | 1.664 | 1875 | 5 | paf | 1.107212 | 182 |
| Ita | Ticino | central | upper | central | central | 0.1180609 | 177.09128 | 1 | 10 | log_linear | NA | relative_risk | same_input_output | 1 | population_weighted_mean | 9 | 1.369 | 1500 | 5 | paf | 1.133865 | 177 |
note: definitely include because WP5 will do
note: include definitely
Check out the intro vignette for examples (to be added)
correlated exposures
life table analysis
get_daly
note: show how to export csv, …
Export to Excel
Exported to .xlsx format
Export to .csv
TODO
Out of scope of healthiar
Using R, e.g. with ggplot2 package
Using Excel (once results are exported)
note: stress that they must install & test healthiar before 2nd WS
note: AC: not more than 2-3 exercises, one with provided numbers, one where they use exdat
note: put exercises in PDF on Teams
If you encounter challenges during installation, get in touch with us!
note: mention programme WS2 & explicitly YOU WILL HAVE TO PROGRAMME IN RSTUDIO USING HEALTHIAR
note: document any suggestions for improvements
Social analysis
note: if time allows